package test.demo.controller;

import test.demo.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RedisController {

    @Autowired
    private RedisUtil redisUtils;

    @RequestMapping("/test")
    public boolean test(String q, String a){
        redisUtils.set(q,a);
        return redisUtils.hasKey(q);
    }

}
